<template>
  <el-config-provider :locale="locale" :size="pageConfig.size" :zIndex="pageConfig.zIndex" :button="pageConfig.button">
    <router-view></router-view>
  </el-config-provider>
</template>

<script setup>
import {useGlobalStoreHook} from "@/store/global";
import {ref, computed, getCurrentInstance, onMounted} from "vue";

const {proxy} = getCurrentInstance();
const globalStore = useGlobalStoreHook();
const pageConfig = ref({
  size: "default",
  zIndex: 2000,
  button: {
    autoInsertSpace: false,
  },
});
const locale = computed(() => proxy.$i18n.messages[proxy.$i18n.locale].el);

onMounted(() => {
  // 设置主题颜色
  globalStore.setAppColor(globalStore.getAppColor);
});
</script>

<style lang="scss" scoped>

</style>
